<?php
var_dump($_FILES);
$filename=$_FILES['file']['tmp_name'];
$srcname=$_FILES['file']['name'];
var_dump($srcname);
$pathname='upload/';
$time=time();
$pathname.=date('y/m/d/',$time);
$ext= end(explode('.', $srcname));
var_dump($ext);
if(!file_exists($pathname)){
mkdir($pathname, 0777, true);    
}
$desname= md5($time.$filename.mt_rand(1, 999999));
var_dump($desname);
$destination=$pathname.$desname.'.'.$ext;
if(move_uploaded_file($filename, $destination)){
    echo "上传成功";
};